#ifndef NUMBER_PROXY_H
#define NUMBER_PROXY_H

#include "abstracttypeproxy.h"

#include <number.h>

#include <QtScript/QScriptValue>

namespace wfnet
{

class NumberProxy : public AbstractTypeProxy
{
    Q_OBJECT
public:
    Q_INVOKABLE NumberProxy(QObject* parent = 0);
    NumberProxy(const NumberProxy& proxy);
    ~NumberProxy();

    void setValue(const QVariant& value);
    const core::Type* getValue() const;

    Q_INVOKABLE QScriptValue add(const QScriptValue& other);
    Q_INVOKABLE QScriptValue sub(const QScriptValue& other);

    Q_INVOKABLE QScriptValue equal(const QScriptValue& other);
    Q_INVOKABLE QScriptValue notEqual(const QScriptValue& other);

public:
    static const QString NAME;

private:
    core::Number m_value;
};

} // namespace wfnet

Q_DECLARE_METATYPE(wfnet::NumberProxy)

#endif
